package com.inspur.edp.common.type;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @author lizhaorui
 * @description TODO
 * @date 2024/5/27 15:39
 */

@Data
public class Parameter {

    public final static String LIST_NAME = "list";

    private String code;

    private String name;

    private boolean varArgs;

    private TypeRefer type;

    private Map<String, DecorationOption> options;

    public void addOpt(DecorationOption opt) {
        if (this.options == null) {
            this.options = new HashMap<>();
        }
        this.options.put(opt.getName(), opt);
    }
}
